package io1;

import java.io.*;

public class CopyDemo3 {
    public static void main(String[] args) throws IOException {
        FileInputStream fis=new FileInputStream("10.jpg");
        BufferedInputStream bis=new BufferedInputStream(fis);
        FileOutputStream fos=new FileOutputStream("100.jpg");
        BufferedOutputStream bos=new BufferedOutputStream(fos);
        long atat=System.currentTimeMillis();
        int b;
        if ((b=bis.read())!=-1){
            bos.write(b);
        }
        long lat=System.currentTimeMillis();
        System.out.println("复制完毕"+(lat-atat)+"ms");
        bis.close();
        bos.close();
    }
}
